Weak behavioral subtyping for types with mutable objects
نویسندگان
چکیده
This paper studies the question of when one abstract data type (ADT) is a behavioral subtype of another, and proposes a model-theoretic notion of weak behavioral subtyping. Weak behavioral subtyping permits supertype abstraction to be a sound and modular reasoning principle in a language with mutation and limited forms of aliasing. The necessary restrictions on aliasing can be statically checked.
منابع مشابه
Preventing Cross-Type Aliasing for More Practical Reasoning
To reason about the correctness of a method when cross-type aliases are possible, one must not only consider all possible patterns of aliasing among the method’s arguments, but all possible ways in which these types’ abstract (specification-only) fields may be aliased. Because of the large number of such aliasing possibilities, and because of the complications they cause for reasoning, cross-ty...
متن کاملModular Reasoning, and Weak Behavioral Subtyping
Existing work on behavioral subtyping either ignores aliasing or restricts the behavior of additional methods in a subtype and only allows one to use invariants and history constraints in reasoning. This prevents many useful subtype relationships; for example, a type with immutable objects (e.g., immutable sequences), cannot have a behavioral subtype with mutable objects (e.g., mutable arrays)....
متن کاملMutation, Aliasing, Viewpoints, Modular Reasoning, and Weak Behavioral Subtyping
Existing work on behavioral subtyping either ignores aliasing or restricts the behavior of additional methods in a subtype and only allows one to use invariants and history constraints in reasoning. This prevents many useful subtype relationships; for example, a type with immutable objects (e.g., immutable sequences), cannot have a behavioral subtype with mutable objects (e.g., mutable arrays)....
متن کاملBehavioral Subtyping is Equivalent to Modular Reasoning for Object-oriented Programs
Behavioral subtyping is an established idea that enables modular reasoning about behavioral properties of object-oriented programs. It requires that syntactic subtypes are behavioral refinements. It validates reasoning about a dynamically-dispatched method call, say E .m(), using the specification associated with the static type of the receiver expression E . For languages with references and m...
متن کاملBehavioral Subtyping in Object-Oriented Languages
Modularity and code reuse are two important features of object-oriented programming. Modularity means that adding new components does not require reveri cation or respeci cation of existing components. A common form of reuse in objectoriented programs is to add new subtypes to existing types and to invoke already existing procedures with objects of these new types. In such cases, behavior of pr...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 1 شماره
صفحات -
تاریخ انتشار 1995